import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
//百度地图
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
// 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import axios from 'axios'
import VueAxios from 'vue-axios'
import baiduMap  from 'vue3-baidu-map-gl'


const app = createApp(App)
// app.use(Vue3BaiduMapGL)
app.use(VueAxios, axios)
app.use(createPinia())
app.use(router)
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(baiduMap, {
  ak: 'AgDqXhdln4cRvdn7rLlmw0gFONB6QwL5',
  plugins: ['TrackAnimation']
})
// app.use(BaiduMap, {
//   // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
//   ak: 'AgDqXhdln4cRvdn7rLlmw0gFONB6QwL5',
//   // v:'2.0',  // 默认使用3.0
//   // type: 'WebGL' // ||API 默认API  (使用此模式 BMap=BMapGL)
// });
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.mount('#app')
